﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class PermisosFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As PermisosBE
        Dim tmpPermisos As PermisosBE = New PermisosBE()
        Try
            With tmpPermisos
                .ClaPerfil = convertDTFromDb.ConvertString(dr.Item("ClaPerfil"))
                .Enabled = convertDTFromDb.ConvertShort(dr.Item("Enabled"))
                .ID = convertDTFromDb.convertInt32(dr.Item("ID"))
                .NombreMenu = convertDTFromDb.ConvertString(dr.Item("NombreMenu"))
                .PAlta = convertDTFromDb.ConvertShort(dr.Item("PAlta"))
                .PBaja = convertDTFromDb.ConvertShort(dr.Item("PBaja"))
                .PCambio = convertDTFromDb.ConvertShort(dr.Item("PCambio"))
                .PConsulta = convertDTFromDb.ConvertShort(dr.Item("PConsulta"))
                .PImprime = convertDTFromDb.ConvertShort(dr.Item("PImprime"))
                .Proceso = convertDTFromDb.ConvertString(dr.Item("Proceso"))
            End With
            Return tmpPermisos
        Catch ex As Exception
            Throw
        Finally
            tmpPermisos = Nothing
        End Try
    End Function
End Class
